package com.kly.order.serviceImpl;


import com.fqgj.common.api.Response;
import com.kly.enums.OrderStatus;
import com.kly.order.db.dao.TOrderDao;
import com.kly.service.OrderFacadeService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Slf4j
@Service("orderFacadeService")
public class OrderFacadeServiceImpl implements OrderFacadeService {
    @Resource
    TOrderDao tOrderDao;

    @Override
    public Response<Integer> countPaid(String userCode) {
        Integer count = tOrderDao.countByStatus(userCode, OrderStatus.PAID.getStatus());
        return Response.ok(count);
    }
}
